import {createApp} from 'vue'
import App from './App.vue'

//导入路由
import router from './router/index'
import store from './store'
//全局导入Element plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//axios
import axios from 'axios'
axios.defaults.baseURL = 'http://localhost:8080';  // 后端地址

import 'viewerjs/dist/viewer.css'
import VueViewer from 'v-viewer'

const app = createApp(App);
app.use(router);
app.use(store);
app.use(ElementPlus);
app.use(VueViewer)
app.mount('#app')
app.config.globalProperties.$http=axios

// 在您的Vue应用入口文件(main.js)中添加
if (process.env.NODE_ENV === 'development') {
  const originalError = console.error;
  console.error = (...args) => {
    if (!args.some(arg => typeof arg === 'string' && arg.includes('runtime.lastError'))) {
      originalError.apply(console, args);
    }
  };
}